package com.cjm.one.order.service;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cjm.one.model.base.PageVo;
import com.cjm.one.model.order.dto.OrderNoRefundDto;
import com.cjm.one.model.order.dto.OrderOperateDTO;
import com.cjm.one.model.order.dto.OrderStatusDto;
import com.cjm.one.model.order.entity.OrderInfo;
import com.cjm.one.model.order.enums.OrderParamsTypeEnum;
import com.cjm.one.model.order.enums.OrderStatusEnum;
import com.cjm.one.model.order.enums.PayTypeEnum;
import com.cjm.one.model.order.vo.OrderInfoVo;

import java.time.LocalDateTime;
import java.util.List;

/**
* @author 29289
* @description 针对表【order_info(订单)】的数据库操作Service
* @createDate 2024-09-05 16:11:25
*/
public interface OrderInfoService extends IService<OrderInfo> {

    PageVo<OrderInfoVo> pageList(Long current, Long size, Long userId, String orderNo, OrderStatusEnum status, PayTypeEnum payStatus, String userName, String createTimeStart, String createTimeEnd, String phone);

    OrderInfoVo getOrderInfoById(Long id);

    Boolean deleteOrderById(Long id);

    Boolean refundOrderById(Long id);

    Boolean updateOrderStatusById(Long id, OrderStatusEnum status);

    Boolean deleteBatchOrderByIds(Long[] ids);

    Page<OrderInfoVo> getList(Long current, Long size, OrderParamsTypeEnum type, Long id);

    String addOrder(OrderOperateDTO orderOperateDTO);

    Boolean updateOrderById(OrderInfoVo orderInfoVo);

    Boolean cancelOrder(String orderId);

    OrderInfoVo selectByOrderNo( String orderNo);

    Boolean updateByOrderStatus(OrderStatusDto orderStatusDto);

    Boolean noRefundOrderByNo(OrderNoRefundDto orderNoRefundDto);

    Long countPaidUsers(LocalDateTime startTime, LocalDateTime endTime);
}
